<!DOCTYPE html><html><head>
<?php

$pid = req('pid'); 
$order = req('order','kid');
$order = in_array($order,array('kid','title','pid')) ? $order : 'kid';
$where = (empty($pid) ? "deep=2" : "pid='$pid'"); 
$burl = surl(0).'?mkv='.$this->mod.'-'.$this->key;

?>
{php $this->pmeta('模板演示'); }
{php}
eimp('initJs','jquery;comm');
eimp('initCss','bootstrap,stpub,jstyle;comm'); 
{/php}
<style type="text/css">
body,nav,div {
    padding:5px;
}
body,td,th,div {
    font-size:14px; line-height:180%;
}
p { text-align:left; margin:auto; }
td,th {
    padding:2px;
}
</style>
</head><body>

{inc:"tester/tester_nav"}

<h3>用模板和类库 - 可以看到head,body等结构:示例</h3>

<nav> pid: 
  <a href='{=$burl}'>[RESET]</a> |
  <a href='{=$burl}&pid=cnhn'>cnhn</a> |
  <a href='{=$burl}&pid=cngd'>cngd</a> |
  <a href='{=$burl}&pid=cngx'>cngx</a> |
<br> orderby: 
  <a href='{=$burl}&order=kid&pid={=$pid}'>kid</a> |
  <a href='{=$burl}&order=title&pid={=$pid}'>title</a> |
  <a href='{=$burl}&order=pid&pid={=$pid}'>pid</a> |
<br> ordermode: 
  <a href='{=$burl}&odesc=1&pid={=$pid}'>odesc=1</a> |
  <a href='{=$burl}&odesc=0&pid={=$pid}'>odesc=0</a> |
<br> view source-code: 
  <a href='{surl(0)}?mkv=info-coder&tpls=tester/utpl' target="_blank">查看代码</a>
</nav>

<hr />

<table border=1>
{tag:demo2=[Page][modid,china][pid,$pid][where,$where][order,$order][limit,10]}
{:row}
<tr><td>{=$t_kid}</td><td>{=$t_pid}</td><td>{=$t_title}</td><td>{=$t_cfgs}</td></tr>
{/row}
</table>
{php echo $_cbase['page']['bar']; }
{/tag:demo2}

{inc:"c_pub/mfoot"}

</body></html>



